﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HangSanXuat_List.ascx.cs" Inherits="cbmobile.UserControl.HangSanXuat_List" %>
<%@ Register Assembly="PQT.Controls" Namespace="PQT.Controls" TagPrefix="pqt" %>

<script language="JAVASCRIPT" type="text/javascript">
    function verify() {
        msg = "Bạn chắc chắn muốn xóa thông tin này không?";
        return confirm(msg);
    } 
</script>

<div class="sb-box">
    <div class="header">
        <h3>Danh sách hãng sản xuất</h3>
        <a href="/RenderMain.aspx?muid=HangSanXuat_Entry&action=addnew"
            class="button small">
            <span>Insert</span>
        </a>
    </div>
    <div class=" clear"></div>
    <div class="bcont">
        <div class="search_box" align="center">
            <table cellpadding="0" cellspacing="0">
                <tr class="trLabelFilter1">
                    <td>
                       Tên
                    </td>
                    <td>
                        <asp:TextBox ID="txtSearch" CssClass="inputtext" Width="100px" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:LinkButton ID="btnSearch" CssClass="button small" runat="server" OnClick="btnSearch_Click">
                                            <span>Search</span>
                        </asp:LinkButton>
                    </td>
                </tr>
            </table>
        </div>
        <div class=" clear">
        </div>
        <div>
        <asp:GridView ID="gvList" runat="server" CssClass="infotable" AutoGenerateColumns="false"
                AlternatingRowStyle-CssClass="bg" Width="100%" 
                OnRowCommand="gvList_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                        <%# numpage() + Container.DisplayIndex + 1%>
                    </ItemTemplate>
                    <ItemStyle Width="30px" CssClass="C" />
                </asp:TemplateField>
            </Columns>
             <Columns>
                <asp:TemplateField HeaderText="Parent ID">
                    <ItemTemplate>
                        <asp:Label ID="lblName" CssClass="text002" Text='<%# Eval("Parent_ID") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
             <Columns>
                <asp:TemplateField HeaderText="Tên">
                    <ItemTemplate>
                        <asp:Label ID="lblDescription" CssClass="text002" Text='<%# Eval("TenHangSX") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
             <Columns>
                <asp:TemplateField HeaderText="Thứ tự">
                    <ItemTemplate>
                        <asp:Label ID="lblSort_Order" CssClass="text002" Text='<%# Eval("ThuTu") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
             <Columns>
                <asp:TemplateField HeaderText="Trạng thái">
                    <ItemTemplate>
                        <asp:Label ID="lblStatus" CssClass="text002" Text='<%# StatusName(Eval("TrangThai")) %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <Columns>
                <asp:TemplateField HeaderText="Thao tác" HeaderStyle-Width="70px">
                    <ItemTemplate>
                        <asp:HyperLink ID="Label6" CssClass="text002" NavigateUrl='<%# BindURLAddParam("HangSX_ID", Eval("HangSX_ID"))%>'
                            runat="server">
                            <asp:Image ID="Image1" ImageUrl="/images/ico_detail.png" runat="server" /></asp:HyperLink>
                        <asp:LinkButton ID="LinkButton1" CommandName="DeleteItem" CommandArgument='<%#Eval("HangSX_ID") %>' OnClientClick="return verify()" runat="server">
                            <asp:Image ID="Image2" ImageUrl="/images/ico_delete.png" runat="server" />
                        </asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle Width="60px" CssClass="C" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        </div>
        <div class="pagination">
            <pqt:PQTPager ID="PQTPager1" runat="server" OnPageIndexChanged="Pager_PageIndexChanged"
                Width="410px" />
        </div>
        <div class=" clear">
        </div>
    </div>
</div>